package com.edu.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.util.Date;
import lombok.Data;

/**
 * 教室申请表
 * @TableName classroom_application
 */
@TableName(value ="classroom_application")
@Data
public class ClassroomApplication {
    /**
     * 申请ID
     */
    @TableId(type = IdType.AUTO)
    private Long applicationId;

    /**
     * 申请类型
     */
    private Object applicationType;

    /**
     * 申请人ID
     */
    private Long userId;

    /**
     * 关联规则ID
     */
    private Long ruleId;

    /**
     * 所需教室类型
     */
    private Object classroomType;

    /**
     * 申请日期
     */
    private Date applyDate;

    /**
     * 开始时间
     */
    private Date startTime;

    /**
     * 结束时间
     */
    private Date endTime;

    /**
     * 申请用途
     */
    private String purpose;

    /**
     * 预计人数
     */
    private Integer expectedPeople;

    /**
     * 设备需求
     */
    private String equipmentNeeds;

    /**
     * 申请状态
     */
    private Object status;

    /**
     * 创建时间
     */
    private Date createTime;

    /**
     * 更新时间
     */
    private Date updateTime;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        ClassroomApplication other = (ClassroomApplication) that;
        return (this.getApplicationId() == null ? other.getApplicationId() == null : this.getApplicationId().equals(other.getApplicationId()))
            && (this.getApplicationType() == null ? other.getApplicationType() == null : this.getApplicationType().equals(other.getApplicationType()))
            && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
            && (this.getRuleId() == null ? other.getRuleId() == null : this.getRuleId().equals(other.getRuleId()))
            && (this.getClassroomType() == null ? other.getClassroomType() == null : this.getClassroomType().equals(other.getClassroomType()))
            && (this.getApplyDate() == null ? other.getApplyDate() == null : this.getApplyDate().equals(other.getApplyDate()))
            && (this.getStartTime() == null ? other.getStartTime() == null : this.getStartTime().equals(other.getStartTime()))
            && (this.getEndTime() == null ? other.getEndTime() == null : this.getEndTime().equals(other.getEndTime()))
            && (this.getPurpose() == null ? other.getPurpose() == null : this.getPurpose().equals(other.getPurpose()))
            && (this.getExpectedPeople() == null ? other.getExpectedPeople() == null : this.getExpectedPeople().equals(other.getExpectedPeople()))
            && (this.getEquipmentNeeds() == null ? other.getEquipmentNeeds() == null : this.getEquipmentNeeds().equals(other.getEquipmentNeeds()))
            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getApplicationId() == null) ? 0 : getApplicationId().hashCode());
        result = prime * result + ((getApplicationType() == null) ? 0 : getApplicationType().hashCode());
        result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
        result = prime * result + ((getRuleId() == null) ? 0 : getRuleId().hashCode());
        result = prime * result + ((getClassroomType() == null) ? 0 : getClassroomType().hashCode());
        result = prime * result + ((getApplyDate() == null) ? 0 : getApplyDate().hashCode());
        result = prime * result + ((getStartTime() == null) ? 0 : getStartTime().hashCode());
        result = prime * result + ((getEndTime() == null) ? 0 : getEndTime().hashCode());
        result = prime * result + ((getPurpose() == null) ? 0 : getPurpose().hashCode());
        result = prime * result + ((getExpectedPeople() == null) ? 0 : getExpectedPeople().hashCode());
        result = prime * result + ((getEquipmentNeeds() == null) ? 0 : getEquipmentNeeds().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", applicationId=").append(applicationId);
        sb.append(", applicationType=").append(applicationType);
        sb.append(", userId=").append(userId);
        sb.append(", ruleId=").append(ruleId);
        sb.append(", classroomType=").append(classroomType);
        sb.append(", applyDate=").append(applyDate);
        sb.append(", startTime=").append(startTime);
        sb.append(", endTime=").append(endTime);
        sb.append(", purpose=").append(purpose);
        sb.append(", expectedPeople=").append(expectedPeople);
        sb.append(", equipmentNeeds=").append(equipmentNeeds);
        sb.append(", status=").append(status);
        sb.append(", createTime=").append(createTime);
        sb.append(", updateTime=").append(updateTime);
        sb.append("]");
        return sb.toString();
    }
}